home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / langs / dl_extra.zoo / libextra.doc < prev   
Encoding:
Text File  |  1994-07-05  |  4.3 KB  |  132 lines

  1. XdLibs Utility Function Library for MiNTlibs
  2. --------------------------------------------
  3.  
  4. This library recreates many of the non-standard but useful routines from
  5. the dLibs/XdLibs standard library distributed with the HSC and SozobonX
  6. compilers.  It is intended primarily for MiNTlibs users who may miss
  7. these functions.
  8.  
  9. This archive should contain the following files:
  10.  
  11.     libextra.a
  12.     The library itself.  Place this in your $LIB or $LIBDIR path.
  13.     extras.h
  14.     Declarations for the routines in the library.  Place this in your
  15.     $INCLUDE or $INCLUDEDIR path.
  16.     libextra.doc
  17.     This file.
  18.  
  19. The following functions are recreated from XdLibs.  Consult the XdLibs
  20. documentation for descriptions.
  21. ==
  22. char *pfindfile(const char *path, const char *afn, const char *ext);
  23.  
  24. char *wildcard(char *pathname);
  25. char *_splitpath(const char *src, char *drive, char *path, char *file,
  26.          char *ext);
  27. char *_makepath(char *dst, const char *drive, const char *path,
  28.         const char *file, const char *ext)
  29.  
  30. char *strset(char *string, int c);
  31. char *strnset(char *string, int c, int n);
  32. char *substr(char *dest, char *source, int start, int end);
  33. char *subnstr(char *dest, char *source, int start, int length);
  34. char *stristr(char *string, char *pattern);
  35. char *strpcpy(char *dest, char *src, char *stop);
  36. int strpos(char *string, int symbol);
  37. char *strrpbrk(char *string, char *set);
  38. int strrpos(char *string, int symbol);
  39. char *strtrim(char *string, char *junk);
  40. char *stradj(char *string, int dir);
  41. int strrpl(char *string, char *ptrn, char *rpl, int n);
  42. int strirpl(char *string, char *ptrn, char *rpl, int n);
  43. int memicmp(char *blk1, char *blk2, int len);
  44. char *ctlcnv(char *string);
  45.  
  46. char *lmemmove(char *dest, char *source, long len);
  47. char *lmemcpy(char *dest, char *source, long len);
  48.  
  49. void *lalloc(long size);
  50. long lread(int h, char *data, long length);
  51. long lwrite(int h, char *data, long length);
  52.  
  53. BASEPAGE *Getbpact_pd(void);
  54.  
  55. unsigned int GetTOSvers __PROTO((long *OS_date, unsigned int *OS_conf,
  56.                  unsigned int * OS_dosdate));
  57.  
  58. int Getcookie( long cookie, long *value );
  59.  
  60. void perrorf(char *fmt, ...);
  61.  
  62. int catch(jmp_buf context, int (*func)(void));
  63. void throw(jump_buf context, int rv);
  64.  
  65. long fsize(char *name);
  66.  
  67. long msize(char *addr);
  68.  
  69. long memavail(void);
  70.  
  71. clock_t start_timer(clock_t *t);
  72. clock_t time_since(clock_t *t);
  73.  
  74. void swab(int *src, int *dst, int n);
  75.  
  76. int bdos(int func, long parameter);
  77. ==
  78.  
  79. The following functions from the XdLibs are not implemented:
  80. ==
  81. void *lsearch(char *key, char *base, int *num, int size, int (*cmp)())
  82. void *lfind(char *key, char *base, int *num, int size, int (*cmp)())
  83. int _tttty(FILE *fp)
  84. long teststack()
  85. int brk(void *address)
  86. int fork()
  87. void shell()
  88. int cfg_ch(int cfg)
  89. int getch()
  90. int getche()
  91. char putch(char c)
  92. int kbhit()
  93. char *getln(char *ip, int (*get)(), int (*put)(), char *buffer, int limit)
  94. void cputs(char *data)
  95. int cprintf(char *fmt, ...)
  96. void hsort(char *base, int num, int size, int (*cmp)())
  97. ==
  98. If you desperately need one of the above functions, or an XdLibs
  99. function not listed above, write me at the address below.  [NB:  If the
  100. function isn't listed here, then it's not in my XdLibs documentation, so
  101. you'll need to send a description as well.]
  102.  
  103. These functions differ from the XdLibs functions in a few points, as
  104. follows:
  105. ==
  106. Functions that take filenames or pathnames are friendlier to extended
  107. filesystems, MinixFS in particular.  This includes accepting both '/'
  108. and '\' as path separators, recognizing "/dev/a" as a drive specifier
  109. (and automaically translating it to "a:" in _splitpath()), and allowing
  110. for filenames with multiple .'s.
  111.  
  112. perrorf() does not print the name of the program, since the MiNTlibs'
  113. startup code does not make it available.
  114.  
  115. The value returned by memavail() takes TT RAM into account.
  116.  
  117. ctlcnv() recognizes the additional escape sequence '\?', translating to
  118. '?' (for use with trigraphs).
  119. ==
  120.  
  121.  
  122. DISCLAIMER:
  123.  
  124. What, you were expecting an ironclad guarantee of performance? ;)  Okay,
  125. I've done enough sanity tests on the library to convince myself that it
  126. works as advertised, but I can't guarantee that there aren't still a few
  127. bugs lurking around in the code.  Caveat emptor, use at your own risk,
  128. and all that jazz.  And if you should happen to find a bug, please
  129. notify me at the address below.
  130.  
  131. Scott Bigham                dsb@cs.duke.edu
  132.